<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>运城市安全生产等级评定及隐患排查治理系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath%>/css/style.css" rel="stylesheet" type="text/css"/>
	<script src="<%=basePath%>/js/js.js" type="text/javascript"></script>
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="<%=basePath%>/js/check_jquery.js"></script>
	<script type="text/javascript" src="<%=path%>/js/My97DatePicker/WdatePicker.js" defer="defer"></script><base target="_self" />
	<script type="text/javascript">
			$(document).ready(function(){
				selected('corpDixiayongtu',$("#corpDixiayongtu1").val());
				
				//地上，地下面积输入变化
				$("input[name^='corpEdit.corpDi']").change(function() {
					var cos =/^[+\-]?\d+(.\d+)?$/;
					v=$(this).val();
				 	if(cos.exec(v)==null){
						$(this).val("");
				    	$(this).next(".note4").html("请输入数字").addClass("note5");
						$(this).focus();
					} else {
						$(this).next(".note5").html("");
					}   
				    sumNum();
				});
			})
			
			$(document).ready(function(){
			    if(${corp.corpIsZyb}==1){ $("#corpZyb").attr("disabled",false);}
			    if(${corp.corpIsTeshe}==1){ $("#corpTeshe").attr("disabled",false);}
			    if(${corp.corpIsDanger}==1){ $("#corpDanger").attr("disabled",false);}
			    if(${corp.corpIsShewei}==1){ $("#corpShewei").attr("disabled",false);}
			})
			
			function doSelect(obj1,obj2){
				var temArry = obj1.split('_');
				if(temArry[1]==1){//无
					$("#"+obj2).val('');
					$("#"+obj2).attr("disabled",true);
				}else{
					$("#"+obj2).attr("disabled",false);
				}
			}
			

			function roundTmp(x,y){
				var _pow=Math.pow(10,y);
				x*=_pow;
			 	x=Math.round(x);
			 	return x/_pow;
			}
			function sumNum(){
		 		var else1 = isNaN(parseFloat($('#bnumber1').val(),10))?0:parseFloat($('#bnumber1').val(),10);
			 	var else2 = isNaN(parseFloat($('#bnumber2').val(),10))?0:parseFloat($('#bnumber2').val(),10);
			 	sumelse=parseFloat(else1)+parseFloat(else2); 
			 	sumelse=roundTmp(sumelse,4);
		     	$("#totalarea").html(sumelse);
			}
			
			 function selected(sid,vval){
				var sele=document.getElementById(sid);
				if(sele!=undefined){
					for(var i=1;i<sele.length;i++){
						if(sele[i].value==vval){
				 			sele[i].selected=true;
						}
					}
				}
			}
</script>
  </head>
  
 <body>
<div id="allbody">
	<div class="head">
		<iframe src="<%=basePath%>/head.jsp" width="1160" height="218" scrolling="no" frameborder="0" ></iframe>
	</div>
	<div class="con">
		<div class="left">
			<div class="left_info">
				<iframe src="<%=basePath%>/left_info.jsp" width="244" height="250" id="iframeleft_top"  onLoad="iFrameHeight()"  scrolling="no" frameborder="0" ></iframe>
			</div>
			<div class="left_link">
				<iframe src="<%=basePath%>/corp_left.jsp" width="244" height="200" id="iframeleft_link"  onLoad="iFrameHeight2()" scrolling="no" frameborder="0" ></iframe>
			</div>
		</div>
		<div class="right">
			<div class="right_map"><a href="<%=basePath%>/corp/index.action">首页</a> &gt; <a href="<%=basePath%>/enterprise/corp_lookInfo.action">企业基本信息</a> &gt; <span>企业基本信息修改</span></div>
			<div class="right_list">
			<form name="corpform" action="<%=basePath%>/enterprise/corp_save.action" method="post">
				<table border="0" cellpadding="0" cellspacing="0" align="center" class="corplist">
					<tr class="tit">
						<th style="text-align:right;padding-right:10px;"> <li><a href="<%=basePath%>/enterprise/corp_lookInfo.action">返回</a></li></th>
					</tr>
				</table>
				<table border="0" cellpadding="0" cellspacing="0" align="center" class="infolist" >
					<tr>
						<td class="info_tit" width="142" style="border-top:none">企业名称：</td>
						<td colspan="3"><s:property value="corp.corpName"/></td>
					</tr>
					<tr>
						<td class="info_tit">注册地址：</td>
						<td colspan="3"><s:property value="corp.corpRegAddress"/></td>
					</tr>
					<tr>
						<td class="info_tit">办公地址：</td>
						<td colspan="3">
							<input size="80" name="corpEdit.corpWorkAddress" type="text" class="info_input" value="<s:property value="corp.corpWorkAddress"/>" id="bit1"/>
						</td>
					</tr>
					<tr>
						<td class="info_tit">经营地址：</td>
						<td colspan="3">
							<input size="80" name="corpEdit.corpOfficeAddress" type="text" class="info_input" value="<s:property value="corp.corpOfficeAddress"/>" />
						</td>
					</tr>
					<tr>
						<td class="info_tit">电子邮箱：</td>
						<td colspan="3">
							<input size="80" id="email" name="corpEdit.corpEmail" type="text" class="info_input" value="<s:property value="corp.corpEmail"/>" /><label class="note4"></label>
						</td>
					</tr>
					<tr>
						<td class="info_tit">成立日期：</td>
						<td width="230">
							<s:date name="corp.corpRegDate" format="yyyy-MM-dd" />
						</td>
						<td class="info_tit"  width="142">隶属关系：</td>
						<td width="231"><s:select list="#{'10':'中央','20':'省','40':'市、地区','50':'县','60':'街道、镇、乡','61':'街道','62':'镇','63':'乡','70':'居民、村民委员会','71':'居民委员会','72':'村民委员会','90':'其他'}" name="corpLixu" value="%{corp.corpLixu}" disabled="true" theme="simple" cssStyle="width:155px;"></s:select></td>
					</tr>
					<tr>
						<td class="info_tit">工商代码：</td>
						<td><s:property value="corp.corpGsCode"/></td>
						<td class="info_tit">组织机构代码：</td>
						<td ><s:property value="corp.corpOrgCode"/></td>
					</tr>
					<tr>
						<td class="info_tit">国民经济类型：</td>
						<td>
							 <s:select list="#{'10':'内资','11':'国有全资','12':'集体全资','13':'股份合作','14':'联营','15':'有限责任（公司）','16':'股份有限（公司）',
						                          '17':'私有','19':'其他内资', '20':'港澳台投资','21':'内地和港、澳、台合资','22':'内地和港、澳、台合作','23':'港、澳、台独资',
						                          '24':'港、澳、台投资股份有限（公司）','29':'其他港澳台投资','30':'国外投资','31':'中外合资','32':'中外合作','33':'外资',
						                          '34':'国外投资股份有限（公司）','39':'其他国外投资','90':'其他' }" name="corpEdit.corpProperty" value="%{corp.corpProperty}" headerKey="" headerValue="请选择" theme="simple"  cssStyle="width:155px;margin-left:5px;" disabled="true">
						    </s:select>
						</td>
						<td class="info_tit">注册类型：</td>
						<td>
							<s:if test="%{corp.corpRegType==1}">企业</s:if>
							<s:if test="%{corp.corpRegType==2}">政府事业单位</s:if>
							<s:if test="%{corp.corpRegType==3}">社会团体</s:if>
							<s:if test="%{corp.corpRegType==4}">民办非企业单位</s:if>
							<s:if test="%{corp.corpRegType==5}">基金会</s:if>
						</td>
					</tr>
					<tr>
						<td class="info_tit">注册资金：</td>
						<td>
							<input name="corpEdit.corpZhucezichang" type="text" id="number1" class="info_input" value='<fmt:formatNumber value="${corp.corpZhucezichang}" pattern="##0.##"/>'  /><label class="note4"></label>（万元）
						</td>
						<td class="info_tit">固定资金：</td>
						<td >
							<input name="corpEdit.corpGudingzichang" type="text"  id="number2" class="info_input" value='<fmt:formatNumber value="${corp.corpGudingzichang}" pattern="##0.##"/>'/><label class="note4"></label>（万元）
						</td>
					</tr>
					
					<tr>
						<td class="info_tit">企业类型：</td>
						<td colspan="3"><s:property value="corp.tbCorpType.typeName"/>-<s:property value="corp.tbCorpTypeMin.typeName"/></td>
					</tr>
					<tr>
						<td class="info_tit">行业部门：</td>
						<td colspan="3"><s:property value="corp.tbCorpTypeMin.unitName"/></td>
					</tr>
					<tr>
						<td class="info_tit">属 地：</td>
						<td colspan="3"><s:property value="corp.tbCounty.deptName"/>-<s:property value="corp.tbStreet.deptName"/>-<s:property value="corp.tbVillage.deptName"/></td>
					</tr>
					<tr>
						<td class="info_tit">电话：</td>
						<td>
							<input name="corpEdit.corpPhone" type="text" class="info_input" value="<s:property value="corp.corpPhone"/>" id="btel1"/><label class="note4"></label>
						</td>
						<td class="info_tit">联系手机：</td>
						<td><input name="corpEdit.corpMobilePhone" type="text" class="info_input1" id="btel2" value="${corp.corpMobilePhone}"><label class="note4">*</label></td>
					</tr>
					<tr>
						<td class="info_tit">安全管理人员数：</td>
						<td>
							<input name="corpEdit.corpAqrs"  id="number3" type="text" class="info_input" value="<s:property value="corp.corpAqrs"/>"  />
						</td>
						<td class="info_tit">从业人数：</td>
						<td>
							<input name="corpEdit.corpCyrs" type="text" class="info_input" value="<s:property value="corp.corpCyrs"/>" id="bnumber13"/><label class="note4">*</label>
						</td>
					</tr>
					<tr>
						<td class="info_tit">地上面积：</td>
						<td>
							<input name="corpEdit.corpDishang" type="text" id="bnumber1" class="info_input" value='<fmt:formatNumber value="${corp.corpDishang}" pattern="##0.0#"/>'/>㎡<label class="note4">*</label>
						</td>
						<td class="info_tit">地下面积：</td>
						<td>
							<input name="corpEdit.corpDixia" type="text" id="bnumber2" class="info_input" value='<fmt:formatNumber value="${corp.corpDixia}" pattern="##0.0#"/>'/>㎡<label class="note4">*</label>
						</td>
					</tr>
					<tr>
						<td class="info_tit">总面积：</td>
						<td><span id="totalarea"><fmt:formatNumber value="${corp.corpDishang+corp.corpDixia}" pattern="##0.##"/> </span>㎡</td>
						<td class="info_tit">地下面积用途：</td>
						<td>
							<input type="hidden" id="corpDixiayongtu1" value="${corp.corpDixiayongtu}"/>&nbsp;
							<select name="corpEdit.corpDixiayongtu" class="info_input" id="corpDixiayongtu">
								<option value="">请选择</option>
								<option value="1">住宿</option>
								<option value="2">经营</option>
								<option value="3">仓储</option>
								<option value="4">其他</option>
							</select>
						</td>
					</tr>
					<tr>
					    <td class="info_tit">安全许可证编号：</td>
						<td>
							<input name="corpEdit.corpXkCode" type="text" class="info_input" value="<s:property value="corp.corpXkCode"/>" />
						</td>
						<td class="info_tit">危化许可证编号：</td>
						<td><input name="corpEdit.corpWhxkCode" type="text" class="info_input1" value="${corp.corpWhxkCode}"></td>
					</tr>
					<tr>
					    <td class="info_tit">安全许可证开始日期：</td>
						<td>
							<input name="corpEdit.corpXkStart" type="text" id="year1" class="Wdate" onclick="WdatePicker({readOnly:true,maxDate:'#F{$dp.$D(\'year2\')}'})" value="<s:date name='corp.corpXkStart' format='yyyy-MM-dd' />">
						</td>
					    <td class="info_tit">危化许可证起始日期：</td>
						<td><input name="corpEdit.corpWhxkStart" type="text" id="year11" class="Wdate" onclick="WdatePicker({readOnly:true,maxDate:'#F{$dp.$D(\'year2\')}'})" value="<s:date name='corp.corpWhxkStart' format='yyyy-MM-dd' />"><label class="note4"></label></td>
					</tr>
					<tr>
					    <td class="info_tit">安全许可证结束日期：</td>
						<td>
							<input name="corpEdit.corpXkEnd" type="text" class="Wdate" id="year2" class="Wdate" onclick="WdatePicker({readOnly:true,minDate:'#F{$dp.$D(\'year1\')}'})" value="<s:date name='corp.corpXkEnd' format='yyyy-MM-dd' />">
						</td>
						<td class="info_tit">危化许可证结束日期：</td>
						<td><input name="corpEdit.corpWhxkEnd" type="text" class="Wdate" id="year22" class="Wdate" onclick="WdatePicker({readOnly:true,minDate:'#F{$dp.$D(\'year1\')}'})" value="<s:date name='corp.corpWhxkEnd' format='yyyy-MM-dd' />"><label class="note4"></label></td>
					</tr>
					<tr>
						<td class="info_tit">邮 编：</td>
						<td>
							<input name="corpEdit.corpPost" type="text" class="info_input" value="<s:property value="corp.corpPost"/>" id="post1"/><label class="note4"></label>
						</td>
						<td class="info_tit">自查上报类型：</td>
						<td>${corp.reportType==0?'半月报':'月报' } <input type="hidden" name="corpEdit.reportType" value="${corp.reportType}"/></td>
					</tr>
					<tr>
						<td class="info_tit">职业病危害：</td>
						<td>
							<input type="radio" onclick="doSelect('corpIsZyb_1','corpZyb');" <s:if test="%{corp.corpIsZyb==0}">checked="checked"</s:if> name="corpEdit.corpIsZyb" value="0">无
							<input type="radio" onclick="doSelect('corpIsZyb_2','corpZyb');" <s:if test="%{corp.corpIsZyb==1}">checked="checked"</s:if> name="corpEdit.corpIsZyb" value="1">有
						</td>
						<td class="info_tit">职业病危害因素：</td>
						<td><input name="corpEdit.corpZyb" id="corpZyb" type="text" class="info_input1" value="${corp.corpZyb}" disabled="disabled"></td>
					</tr>
					<tr>
					    <td class="info_tit">特种设备：</td>
						<td >
							<input type="radio" onclick="doSelect('corpIsTeshe_1','corpTeshe');" <s:if test="%{corp.corpIsTeshe==0}">checked="checked"</s:if> name="corpEdit.corpIsTeshe" value="0">无
							<input type="radio" onclick="doSelect('corpIsTeshe_2','corpTeshe');" <s:if test="%{corp.corpIsTeshe==1}">checked="checked"</s:if> name="corpEdit.corpIsTeshe" value="1">有
						</td>
						<td class="info_tit">特种设备名称：</td>
						<td><input name="corpEdit.corpTeshe" id="corpTeshe" type="text" class="info_input1" value="${corp.corpTeshe}" disabled="disabled"></td>
					</tr>
					<tr>
					    <td class="info_tit">涉及危化使用：</td>
						<td>
							<input type="radio" onclick="doSelect('corpIsShewei_1','corpShewei');" <s:if test="%{corp.corpIsShewei==0}">checked="checked"</s:if> name="corpEdit.corpIsShewei" value="0">无
							<input type="radio" onclick="doSelect('corpIsShewei_2','corpShewei');" <s:if test="%{corp.corpIsShewei==1}">checked="checked"</s:if> name="corpEdit.corpIsShewei" value="1">有
						</td>
						<td class="info_tit">涉及危化名称：</td>
						<td><input name="corpEdit.corpShewei" id="corpShewei" type="text" class="info_input1" value="${corp.corpShewei}" disabled="disabled"></td>
					</tr>
					<tr>
						<td class="info_tit">重大危险源：</td>
						<td>
							<input type="radio" onclick="doSelect('corpIsDanger_1','corpDanger');" <s:if test="%{corp.corpIsDanger==0}">checked="checked"</s:if> name="corpEdit.corpIsDanger" value="0">无
							<input type="radio" onclick="doSelect('corpIsDanger_2','corpDanger');" <s:if test="%{corp.corpIsDanger==1}">checked="checked"</s:if> name="corpEdit.corpIsDanger" value="1">有
						</td>
						<td class="info_tit">重大危险源名称：</td>
						<td><input name="corpEdit.corpDanger" id="corpDanger" type="text" class="info_input1" value="${corp.corpDanger}" disabled="disabled"></td>
					</tr>
					<tr>
						<td class="info_tit">是否是爆破拆除作业单位：</td>
						<td>
							<input type="radio" <s:if test="%{corp.isBlastingDemolition==0}">checked="checked"</s:if> name="corpEdit.isBlastingDemolition" value="0">否
							<input type="radio" <s:if test="%{corp.isBlastingDemolition==1}">checked="checked"</s:if> name="corpEdit.isBlastingDemolition" value="1">是
						</td>
						<td class="info_tit">标准化认证级别：</td>
						<td>
							<input name="corpEdit.nationGrade" type="text" class="info_input" value="<s:property value="corp.nationGrade"/>"/>
						</td>
					</tr>
					<tr>
					    <td class="info_tit">认证信息：</td>
						<td>
							<input name="corpEdit.corpRenzhengxinxi" type="text" class="info_input" value="<s:property value="corp.corpRenzhengxinxi"/>"/>
						</td>
						<td class="info_tit"></td>
						<td></td>
					</tr>
					<tr>
						<td class="info_tit">原 料：</td>
						<td>
							<input name="corpEdit.corpYuanliao" type="text" class="info_input" value="<s:property value="corp.corpYuanliao"/>"/>
						</td>
						<td class="info_tit">生产经营项目：</td>
						<td>
							<input name="corpEdit.corpJingyixiangmu" type="text" class="info_input" value="<s:property value="corp.corpJingyixiangmu"/>"/>
						</td>
					</tr>
					<tr>
						<td class="info_tit">产 品：</td>
						<td colspan="3">
							<input  size="80" name="corpEdit.corpChanpin" type="text" class="info_input" value="<s:property value="corp.corpChanpin"/>"/>
						</td>
					</tr>
					<tr>
						<td colspan="4"  class="info_tit" style="text-align:center;height:35px;"><input type="submit" name="btntj" class="input_link" id="btnSubmit" value="提 交"/> <input type="reset" name="btnset" class="input_link" id="btnset" value="重 置"/> </td>
					</tr>
				</table>
				<input type="hidden" name="corpEdit.corpStatus" value="${corp.corpStatus}"/>
			</form>
			</div>
		</div>
	</div>
	<div class="foot">
		<iframe src="<%=basePath%>/foot.html" width="1160" height="89" scrolling="no" frameborder="0" ></iframe>
	</div>
</div>
<s:if test="%{tip!=null}">
	<script>
		alert('${tip}');
	</script>
</s:if>
</body>
</html>
